package com.liming.common.pojo.vo.coupon;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author liming
 * @date 2025/1/19
 */
@Data
@Schema(description = "优惠券BaseVO:不当返回结果:只会被继承")
public class BaseCouponVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "优惠券ID")
    private Long id;

    @Schema(description = "优惠券名称")
    private String name;

    @Schema(description = "优惠券类型（1 满减券， 2 折扣券）")
    private Integer discountType;

    @Schema(description = "优惠券开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startDate;

    @Schema(description = "优惠券结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDate;

    @Schema(description = "优惠券使用次数限制（0 表示无限制）")
    private Integer usageLimit;

    @Schema(description = "发放数量（0 表示无限制）")
    private Integer quantity;

    @Schema(description = "平台优惠券使用次数")
    private Integer usageCount;

    @Schema(description = "优惠券当前是否可用，0 表示不可用，1 表示可用")
    private Integer available;
}
